<?php /* Smarty version 2.6.26, created on 2013-08-31 10:28:55
         compiled from product_admin.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'l', 'product_admin.tpl', 19, false),array('modifier', 'thumb', 'product_admin.tpl', 19, false),array('modifier', 'date_format', 'product_admin.tpl', 22, false),array('modifier', 'number_format', 'product_admin.tpl', 26, false),)), $this); ?>
<div class="box">
  <div class="box-content">
	  <form method="post">
      <table class="adminlist">
      <thead>
      <tr>
        <th width="30">ID</th>
        <th width="80">Thumbnail</th>
        <th>Thông tin</th>
        <th width="100">Giá bán</th>
        <th width="100">Trạng thái</th>
        <th width="100">Chỉnh sửa</th>
      </tr>
      </thead>
      <tbody>
      <?php $_from = $this->_tpl_vars['aProduct']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['product']):
?>
      <tr>
        <td><?php echo $this->_tpl_vars['product']['product_id']; ?>
</td>
        <td align="center"><a href="<?php echo ((is_array($_tmp='product/detail/%d')) ? $this->_run_mod_handler('l', true, $_tmp, $this->_tpl_vars['product']['product_id']) : smarty_modifier_l($_tmp, $this->_tpl_vars['product']['product_id'])); ?>
" target="_blank"><img src="<?php echo ((is_array($_tmp=$this->_tpl_vars['product']['product_thumb'])) ? $this->_run_mod_handler('thumb', true, $_tmp, 'h75') : smarty_modifier_thumb($_tmp, 'h75')); ?>
" /></a></td>
        <td>
					<strong>[<?php echo $this->_tpl_vars['product']['product_code']; ?>
]</strong> <a href="<?php echo ((is_array($_tmp='product/detail/%d')) ? $this->_run_mod_handler('l', true, $_tmp, $this->_tpl_vars['product']['product_id']) : smarty_modifier_l($_tmp, $this->_tpl_vars['product']['product_id'])); ?>
" target="_blank"><?php echo $this->_tpl_vars['product']['product_title']; ?>
</a><br />
					<em>Ngày đăng: </em><?php echo ((is_array($_tmp=$this->_tpl_vars['product']['product_created'])) ? $this->_run_mod_handler('date_format', true, $_tmp) : smarty_modifier_date_format($_tmp)); ?>
<br />
					<em>Danh mục:</em> <?php echo $this->_tpl_vars['aCat'][$this->_tpl_vars['product']['product_cat_id']]; ?>

				</td>
				<td align="center">
					<?php echo ((is_array($_tmp=$this->_tpl_vars['product']['product_price'])) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp)); ?>

					<?php if ($this->_tpl_vars['product']['product_price_src']): ?><br /><span class="old-price"><?php echo ((is_array($_tmp=$this->_tpl_vars['product']['product_price_src'])) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp)); ?>
</span><?php endif; ?>
				</td>
        <td align="center"><?php if ($this->_tpl_vars['product']['product_avaiable'] == 0): ?>Hết hàng<?php else: ?>Còn hàng<?php endif; ?></td>
        <td align="center" nowrap="nowrap">
          <a href="<?php echo ((is_array($_tmp='product/edit/%d')) ? $this->_run_mod_handler('l', true, $_tmp, $this->_tpl_vars['product']['product_id']) : smarty_modifier_l($_tmp, $this->_tpl_vars['product']['product_id'])); ?>
">Sửa</a> - 
          <a class="confirm" href="<?php echo ((is_array($_tmp='product/delete/%d')) ? $this->_run_mod_handler('l', true, $_tmp, $this->_tpl_vars['product']['product_id']) : smarty_modifier_l($_tmp, $this->_tpl_vars['product']['product_id'])); ?>
">Xóa</a>
				</td>
      </tr>
      <?php endforeach; else: ?>
      <tr>
        <td colspan="6" align="center">(Hiện chưa có sản phẩm nào.)</td>
      </tr>
      <?php endif; unset($_from); ?>
      </tbody>
      </table>
      </form>
      <div><?php echo $this->_tpl_vars['pager']; ?>
</div>
  </div>
</div>